refactor option handling (#1351)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Fri, 18 Oct 2024 21:23:22 +0000 (15:23 -0600)
committerGitHub <noreply@github.com>
Fri, 18 Oct 2024 21:23:22 +0000 (15:23 -0600)
commit8466bfbd24e62408301c3d4139dbadf2dfc6eaed
treed375c2ce9b49ee20af62be5b9339766b5254a46f
parentf32f4da53d7b1328c489e6d2e60e7cf69fcf8f39
refactor option handling (#1351)

* rough in Option class

* testo passes

* rough in OptionBool

* more OptionBool use

* more OptionBool

* fix isEmpty

* store qstrings

* dont return const

* rename

* convert a few lost ARGTYPE_BOOLs to OptionBool.

* utilize avalable QString for options.

* obsolete argvalptr

* Option is abstract class

* eliminate special handling of ARGTYPE_BOOL without default in vecs.

* fix #982 ...

garmin, ozi, xcsv mkshort options whitespace_ok, must_unique broken since 2006.

* test to make sure OptionBool iff ARGTYPE_BOOL

* use OptionBool for all ARGTYPE_BOOL options.

* correct OptionBool type.

* delete unused parameterized Option ctors.

* format and comment option.h

* nodiscard for class Option.

* vecs nullptr checks

* have Vecs::validate_args check argval isn't nullptr.

* catch up includes

* clarify comment

* fix introduced bug caught by tidy.
85 files changed:
arcdist.cc
arcdist.h
bend.h
defs.h
dg-100.cc
dg-100.h
discard.cc
discard.h
duplicate.h
exif.cc
exif.h
filter_vecs.cc
filter_vecs.h
garmin.cc
garmin.h
garmin_fit.cc
garmin_fit.h
garmin_gpi.cc
garmin_gpi.h
garmin_txt.cc
garmin_txt.h
garmin_xt.h
gdb.h
geo.cc
geo.h
geojson.h
globalsat_sport.cc
globalsat_sport.h
gpx.cc
gpx.h
gtrnctr.cc
gtrnctr.h
height.cc
height.h
html.h
igc.cc
igc.h
interpolate.cc
interpolate.h
kml.cc
kml.h
lowranceusr.cc
lowranceusr.h
mtk_logger.cc
mtk_logger.h
nmea.cc
nmea.h
nukedata.cc
nukedata.h
option.h [new file with mode: 0644]
osm.cc
osm.h
ozi.cc
ozi.h
polygon.cc
polygon.h
position.cc
position.h
radius.cc
radius.h
random.h
resample.h
shape.h
skytraq.cc
skytraq.h
smplrout.h
sort.h
stackfilter.h
subrip.cc
subrip.h
text.h
tpg.cc
tpg.h
trackfilter.cc
trackfilter.h
transform.cc
transform.h
unicsv.h
validate.cc
validate.h
vcf.h
vecs.cc
vecs.h
xcsv.cc
xcsv.h